<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.clamp {
  display: inline-block;
  overflow: hidden;
  font: 16px / 32px monospace;
  white-space: pre;
  padding: 0 4px;
  background-color: yellow;
}
</style>
Before <div class="clamp">Line 1
Line 2
Line …</div> After</div>
<p>Following content.</p>
